import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import MovieDetail from "../views/MovieDetail";
import CategoryMovie from "../views/CategoryMovie";
import Search from "../views/Search";
import Play from "../views/Play";
import Test from "../views/Test";
import PaySuccess from "../views/PaySuccess";


Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: 'Home',
        component: Home
    },
    {
        path: '/detail/:pk',
        name: 'MovieDetail',
        component: MovieDetail
    },
    {
        path: '/play/:pk',
        name: 'Play',
        component: Play
    },
    {
        path: '/category',
        name: 'CategoryMovie',
        component: CategoryMovie
    },
    {
        path: '/search',
        name: 'Search',
        component: Search
    },
    {
        path: '/test',
        name: 'Test',
        component: Test
    },
     {
        path: '/pay/success',
        name: 'PaySuccess',
        component: PaySuccess
    },


]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router
